﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;

using System.Reflection;
using System.Text;

using System.Windows.Forms;
using ET199ComLib;


namespace Test
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            /// netDxf.DxfDocument dxfDocument=new DxfDocument();
            //DxfDocument aDocument = DxfDocument.Load(@"G:\照片文件\生肖裁切\dxf3\兔3.dxf");
            //DxfDocument aDocument1 = DxfDocument.Load(@"G:\照片文件\生肖裁切\生肖dxf\兔.dxf");
            //DxfDocument aDocument2 = DxfDocument.Load(@"G:\照片文件\生肖裁切\生肖4点dxf\兔2.dxf");
            // var aaa = aDocument.LwPolylines[0].Vertexes[0].Position;
            // //string str = "1234abcdd的";
            // //byte[] array = Encoding.UTF8.GetBytes(str);//将字符串转化为字节数组
            // //MemoryStream memory = new MemoryStream(array);//初始化MemoryStream类
            // //byte[] arrayNew = memory.ToArray();//将内存中的数据转换为字节数组
            // //string strNew = Encoding.UTF8.GetString(arrayNew);//将字节数组转换为字符串

            // ////aDocument.Lines.OrderBy(o=>) 
            // // //DxfExtend.GetDxfInfo(Encoding.UTF8.GetBytes(sr.ReadToEnd()));
            // // SmallERP.COM.DxfExtend.GetDxfInfo(DxfExtend.GetFileContent(@"G:\照片文件\生肖裁切\生肖4点dxf\猪2.dxf"));
            // // DxfObjecctInfo mindxfObjecctInfo =
            // //     SmallERP.COM.DxfExtend.ListDXFObj.FirstOrDefault(p => p.KeyString == "$EXTMIN");
            // // DxfObjecctInfo maxdxfObjecctInfo =
            // //     SmallERP.COM.DxfExtend.ListDXFObj.FirstOrDefault(p => p.KeyString == "$EXTMAX");
            // // DXFPointer maxPointer = DxfExtend.AlyseEXTVaue(maxdxfObjecctInfo.ContentList);
            // // DXFPointer minPointer = DxfExtend.AlyseEXTVaue(mindxfObjecctInfo.ContentList);
            // // var w = maxPointer.X - minPointer.X;
            // // var h = maxPointer.Y - minPointer.Y;
            // //  ;//将字符串转化为字节数组
            // // List<LineExtend> rtnList = new List<LineExtend>();           //操作的List
            // //  NetDxfExtend extend = new WHDXF.NetDxfExtend();                    G:\照片文件\生肖裁切\生肖4点dxf
            // //var zz=  extend.GetCutInfo(@"G:\Drawing1.dxf") ;
            // // var aaa = NetDxfExtend.GetCutInfo(@"G:\照片文件\生肖裁切\dxf3\兔3.dxf");
            try
            {
                ET199 et = new ET199();
                //Type indAppType = Type.GetTypeFromProgID("LayoutDll.ClassInterFace");
                LayoutDll.ClassInterFace InterFace = new LayoutDll.ClassInterFace();
                //var  aaa = (LayoutDll.ClassInterFace)Activator.CreateInstance(indAppType, true);
            }
            catch (Exception ex)
            {
                //MessageBox.Show("软件未授权请联系上海惟鸿网络", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

                MessageBox.Show(ex.ToString());

            }

        }

    }
}
